From 00d077de1b1fb4f500d05f5b35d52d809beae595 Mon Sep 17 00:00:00 2001 From: Bond-009 Date: Thu, 31 Aug 2017 17:50:07 +0200 Subject: Drop enderchest when broken by a silk touck pick (#3986) --- src/Blocks/BlockEnderchest.h | 1 - src/Blocks/BlockHandler.cpp | 6 ++++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Blocks/BlockEnderchest.h b/src/Blocks/BlockEnderchest.h index 7ce162cd5..8fd5c2a89 100644 --- a/src/Blocks/BlockEnderchest.h +++ b/src/Blocks/BlockEnderchest.h @@ -18,7 +18,6 @@ public: virtual void ConvertToPickups(cItems & a_Pickups, NIBBLETYPE a_BlockMeta) override { - // todo: Drop Ender Chest if using silk touch pickaxe a_Pickups.push_back(cItem(E_BLOCK_OBSIDIAN, 8, 0)); } diff --git a/src/Blocks/BlockHandler.cpp b/src/Blocks/BlockHandler.cpp index 76cfc763f..41b9780ac 100644 --- a/src/Blocks/BlockHandler.cpp +++ b/src/Blocks/BlockHandler.cpp @@ -525,6 +525,12 @@ void cBlockHandler::DropBlock(cChunkInterface & a_ChunkInterface, cWorldInterfac // Need to access the bed entity to get the color for the item damage ConvertToPickups(a_WorldInterface, Pickups, Meta, a_BlockX, a_BlockY, a_BlockZ); } + case E_BLOCK_ENDER_CHEST: + { + // Reset meta to 0 + Pickups.Add(m_BlockType, 1, 0); + break; + } default: Pickups.Add(m_BlockType, 1, Meta); break; } } -- cgit v1.2.3